<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<body>

<ul layout:fragment="facets">
  <li th:each="facet : ${root.facets}" th:class="${facet.name.toLowerCase()}+'-facet facet'">
    <div class="facet--wrapper">
      <div class="facet-name pull-left" th:text="${facet.name}">Facet</div>
      <div class="facet-actions">
        <i class="icon-reorder js-toggle-sub-facet-list"></i>
        <label class="checkbox-pill js-checkbox-pill">
          <span class="facet-count" th:text="${facet.count}">(123)</span>
          <span class="checkbox-pill--checkbox">
              <input type="checkbox" name="filters" th:value="${facet.fullPath}" th:field="*{filters}" />
          </span>
        </label>
      </div>
    </div>

    <ul th:if="${facet.hasHeaderFacets()}" class="facet-section--header">
      <li th:each="headerFacet : ${facet.headerFacets}" >
        <div class="facet--wrapper">
          <label class="checkbox-pill">
            <span th:text="${headerFacet.name}">Facet</span>
            <span class="checkbox-pill--checkbox">
              <input type="checkbox" name="filters" th:value="${headerFacet.fullPath}" th:field="*{filters}" />
            </span>
          </label>
        </div>
      </li>
    </ul>

    <ul th:if="${facet.hasFacets()}" layout:include="search/_facets :: facets" th:with="root=${facet}" class="sub-facet--list"></ul>

  </li>
</ul>

</body>
</html>




